Availability |
3.0 |
Description |
Applies the specified style to the specified element. This function is valid only for the active document. |
Arguments |
elementNode, styleName, {classOrID} |
|
 |
The first argument is an element node in the DOM. If elementNode is specified as NULL or empty string ('' ), the function acts on the current selection. |
 |
The second argument is the name of a CSS style. |
 |
The third argument is the attribute with which the style should be applied (either "class" or "id"). If elementNode is specified as NULL or empty string and no tag exactly surrounds the selection, the style is applied using SPAN tags. If the selection is an insertion point, Dreamweaver uses heuristics to determine to which tag the style should be applied. |
|
Returns |
Nothing. |
Enabler |
None. |
Example |
The following code applies the red style to the selection, either by surrounding the selection with SPAN tags or by applying a CLASS attribute to the tag that surrounds the selection: |
 |
|